package com.ruoyi.finance.api.factory;


import com.ruoyi.common.core.domain.R;
import com.ruoyi.finance.api.RemoteBuyMustPayService;
import com.ruoyi.finance.domain.BuyMustPay;

import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class RemoteBuyMustPayFallbackFactory implements FallbackFactory<RemoteBuyMustPayService> {

    @Override
    public RemoteBuyMustPayService create(Throwable cause) {
        return new RemoteBuyMustPayService() {
            @Override
            public R<Boolean> addBuyMustPay(BuyMustPay buyMustPay, String source) {
                return R.fail(false,"addBuyMustPay 远程内部调用失败");
            }
        };
    }
}
